package com.原型模式;

import java.io.IOException;

public class Test {

    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {
        Sharpe sharpe = new Sharpe("Tom", 10, "白色",new Children("小儿子"));
        //执行深克隆
        Sharpe clone = DeepClone.deepClone(sharpe);
        //比较父类对象是否一样
        System.out.println(sharpe==clone);
        //比较子类属性是否一样
        System.out.println(sharpe.getChildren()==clone.getChildren());
    }
}
